package dao.order.test;

import edu.nf.waimai.dao.order.OrderDAO;
import edu.nf.waimai.dao.order.impl.OrderDAOImpl;
import edu.nf.waimai.dao.shop.ShopDAO;
import edu.nf.waimai.dao.shop.impl.ShopDAOImpl;
import edu.nf.waimai.dao.user.UserDAO;
import edu.nf.waimai.dao.user.impl.UserDaoImpl;
import edu.nf.waimai.model.order.UserOrder;
import edu.nf.waimai.model.shop.Shop;
import edu.nf.waimai.model.user.Address;
import org.junit.Test;

import java.util.List;

/**
 * @Date 2023/7/3
 * @Author zgm
 */
public class Order {
    @Test
    public void listShop(){
//        OrderDAO dao = new OrderDAOImpl();
//        Shop shop = new Shop();
//        shop.setShopAddress("斗门");
//        List<Shop> list = dao.listShopPaging(shop, 1, 10);
//        list.forEach(System.out::println);
//        UserDAO dao = new UserDaoImpl();
//        List<Address> list = dao.queryListUserAddress(2);
//        list.forEach(System.out::println);

//        UserDAO dao = new UserDaoImpl();
//        Address address = dao.queryUserAddressById(1);
//        System.out.println(address);
//        System.out.println(new OrderDAOImpl().listShopOrder(1, 1));
//        OrderDAO service = new OrderDAOImpl();
//        List<UserOrder> list = service.listOrder(2, "WaiMai");

//        ShopDAO dao  = new ShopDAOImpl();
//        Shop shop = new Shop();
//        shop.setShopAddress("广东省珠海市斗门区");
//        List<Shop> list = dao.listShopPaging(shop, 1, 10);
//        System.out.println(list);

        OrderDAO dao = new OrderDAOImpl();
        edu.nf.waimai.model.order.UserOrder order = dao.getShopOrder("2023090704480532105");
        System.out.println(order);
    }
}
